import request from '@/api/request'

// 获取文章列表 token start limit
export function findArticles(start ,limit,data) {
  return request({
    url: `/lejuAdmin/productArticle/findArticles/${start}/${limit}`,
    method: 'POST',
    data
  })
}

// 增加文章
export function addArticle(data) {
    return request({
      url: '/lejuAdmin/productArticle/addArticle',
      method: 'POST',
      data
    })
  }

//   文章明细

export function productArticle(id) {
    return request({
      url: `/lejuAdmin/productArticle/productArticle/${id}`,
      method: 'get',
    })
  }
// 更新文章

export function updateArticle(data) {
    return request({
      url: '/lejuAdmin/productArticle/updateArticle',
      method: 'POST',
      data
    })
  }

// 删除文章
export function del(id) {
    return request({
      url: `/lejuAdmin/productArticle/del/${id}`,
      method: 'delete',
    })
  }
  
//  更换是否显示
  export function changeShowStatus(data) {
    return request({
      url: '/lejuAdmin/productArticle/changeShowStatus',
      method: 'POST',
      data
    })
  }